<?php
	$uname=$_REQUEST['name'];
	$mes=$_REQUEST['pop'];
	$sex=$_REQUEST['sex'];
	$img=$_REQUEST['imgurl'];
	$bbsid=$_REQUEST['id'];
	$text=$_REQUEST['text'];
	require 'db_contact.php';
	$sql="update tb_emp
		set 姓名='$uname',所属部门='$sex',头像='$img',个性留言='$text',入职时间='$mes'
		where id='$bbsid'
	";
	
	$rs=$db->query($sql);//当$rs为添加的记录数
	
	if ($rs==1){
			echo "<script>";
		   echo "alert('修改成功');";
		   echo "window.location.href='main.php';";
		   echo "</script>";
	}
	else
	{
		   echo "<script>";
		   echo "alert('修改失败');";
		   echo "window.location.href='main.php';";
		   echo "</script>";
	}
	